package biz

import (
	"log"

	"org.knight/biz/repo"
	"org.knight/data"
)

type IEConsumer struct {
	//

	repo *repo.DBRepository
}

/**

 */
func (c *IEConsumer) Persist(ie *data.InfoElement) {

	log.Printf("saving data ie:=%s \n", ie)

	c.repo.Save(ie)

	log.Printf("saved data ie:=%s \n", ie)

	ieId := ie.ID

	ie.Label.IEID = ieId

	c.repo.Save(ie.Label)

	//ie.Spec.IEID = ieId
	//save Spec
}
